// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

/**
 * Enum for road mark types.
 */
enum class FWorldRoadMarkKind
{
	None,
	Solid,
	Broken,
	SolidSolid,
	SolidBroken,
	BrokenSolid,
	BrokenBroken,
	BottsDots,
	Grass,
	Curb
};

inline FWorldRoadMarkKind FWorldRoadMarkKindFromJson(const json& j)
{
	if (j == "none")			return FWorldRoadMarkKind::None;
	if (j == "solid")			return FWorldRoadMarkKind::Solid;
	if (j == "broken")			return FWorldRoadMarkKind::Broken;
	if (j == "solid solid")		return FWorldRoadMarkKind::SolidSolid;
	if (j == "solid broken")		return FWorldRoadMarkKind::SolidBroken;
	if (j == "broken solid")		return FWorldRoadMarkKind::BrokenSolid;
	if (j == "broken broken")	return FWorldRoadMarkKind::BrokenBroken;
	if (j == "botts dots")		return FWorldRoadMarkKind::BottsDots;
	if (j == "grass")			return FWorldRoadMarkKind::Grass;
	if (j == "curb")			return FWorldRoadMarkKind::Curb;
	return FWorldRoadMarkKind::None;
}

inline json FWorldRoadMarkKindToJson(FWorldRoadMarkKind p)
{
	if (p == FWorldRoadMarkKind::None)			return "none";
	if (p == FWorldRoadMarkKind::Solid)			return "solid";
	if (p == FWorldRoadMarkKind::Broken)		return "broken";
	if (p == FWorldRoadMarkKind::SolidSolid)	return "solid solid";
	if (p == FWorldRoadMarkKind::SolidBroken)	return "solid broken";
	if (p == FWorldRoadMarkKind::BrokenSolid)	return "broken solid";
	if (p == FWorldRoadMarkKind::BrokenBroken)	return "broken broken";
	if (p == FWorldRoadMarkKind::BottsDots)		return "botts dots";
	if (p == FWorldRoadMarkKind::Grass)			return "grass";
	if (p == FWorldRoadMarkKind::Curb)			return "curb";
	return "none";
}

inline void from_json(const json& j, FWorldRoadMarkKind& p)
{
	p = FWorldRoadMarkKindFromJson(j);
}

inline void to_json(json& j, const FWorldRoadMarkKind& p)
{
	j = FWorldRoadMarkKindToJson(p);
}
